<?php 	
	include_once("./View/Topo.php");

?>

	<fieldset>
			<legend> Lista de Grupos </legend>
						
			<form role="form" action="AcaoGrupo.php" method="POST">
						
			<table class="table table-striped table-hover" width="100%" border="0">

				<tr>
					<th width="10%"> Codigo </th>
					<th width="30%"> Grupo 	</th>
					<th width="10%"> Cod.Subgrupo   </th>
					<th width="50%"> Subgrupo </th>
			
					<th width="15%" align="right"> Acoes  </th>
	
					</tr>
				<?php 
					
					foreach ($this->grupos as $grupo)
					{
						echo "
						<form role='form' action='./AcaoGrupo.php' method='POST' >	

						<input type='hidden' name='idGrupo' value='" .$grupo->getIdGrupo(). "'/>
								
								<td align='right'> " . $grupo->getIdGrupo() . " </td>
								<td> " . $grupo->getNome() . " </td>

								";
								
				?>
						<td>
							<div class="row pull-right">
								<div class="col-sm-12">	
									<button type="submit" name="metodo" metodo="excluir" value="excluir" class="btn btn-danger" >
										<span class="glyphicon glyphicon-remove"></span> EXCLUIR 
									</button>
								</div>
							</div>	
						</td>
						
						<td>
							<div class="row pull-right">
								<div class="col-sm-12">	

									<button type="submit" name="metodo" metodo="alterar" value="alterar" class="btn btn-warning" value="alterar">
										<span class="glyphicon glyphicon-pencil"></span> ALTERAR 
									</button>
								</div>
							</div>		
						</td>

						
					


			    </form>
			</tr>
			
			<?php
			
			}

			?>

			

			</table>

		<div class="row pull-right">

			<div class="col-sm-12">	
				<button type="submit" name="metodo" metodo="cadastrar" class="btn btn-primary" value="cadastrar">
					<span class="glyphicon glyphicon-plus"></span> NOVO 
				</button>
			</div>
		</div>



		
		</fieldset>	

<?php 
	include_once("./View/Rodape.php");
?>		